package com.elm;

import com.elm.app.ElmAdminEntry;
import com.elm.app.ElmBusinessEntry;
import com.elm.util.ConsoleUtil;

public class Main {
    public static void main(String[] args) {
        if (args.length == 0) {
            ConsoleUtil.printError("请指定要运行的模式：admin 或 business。");
            ConsoleUtil.printMessage("用法：java -jar your-app.jar [admin|business]");
            return;
        }

        String mode = args[0].toLowerCase();

        switch (mode) {
            case "admin":
                ElmAdminEntry.run();
                break;
            case "business":
                ElmBusinessEntry.run();
                break;
            default:
                ConsoleUtil.printError("无效的模式：'" + mode + "'。请指定 'admin' 或 'business'。");
                ConsoleUtil.printMessage("用法：java -jar your-app.jar [admin|business]");
                break;
        }
    }
}
